import React, { useState } from 'react';
import axios from 'axios';
const LinQu = () => {
    const [userId, setUserId] = useState(1); // Replace with the actual user ID
  
    const handleRedeem = async () => {
      try {
        const response = await axios.post('http://localhost:3001/redeemPoints', { userId });
        console.log(response.data);
      } catch (error) {
        console.error(error);
      }
    };
  
    return (
      <div>
        <h1>Redeem Points</h1>
        <button onClick={handleRedeem}>Redeem 100 Points</button>
      </div>
    );
  };
export default LinQu